<?php
	require "settings/config.php";
	require "layout.php";
	require "includes/sql_functions.php";
	require "includes/reg_functions.php";
	require "includes/session.php";
	
	if($_POST['username'])
	{
		$res=oh_login_user($_POST['username'],$_POST['password']);
		if($res=="normal")
		{
			header('Location: signup.php');
		}
		else if ($res=="firstlogin")
		{
			header('Location: firstlogin.php');
		}
		else
		{
			header('Location: login.php?badpass=1');
		}
	}

?>
